package com.tiger.cloud.dao.crm;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.tiger.cloud.common.mybatis.MybatisTigerDao;
import com.tiger.cloud.model.crm.User;
import com.tiger.cloud.model.ext.UserInfoAndCompany;
import com.tiger.cloud.model.ext.UserInfos;

/**
 * 用户管理Dao
 */
public interface UserDao extends MybatisTigerDao<User>{
    User findOneByUserId(@Param(value = "userId") long userId);
    List<UserInfoAndCompany> findUserAndCompanyInfo(@Param(value = "userId") long userId);

    List<UserInfos> findUserList(UserInfos user);
    Integer userCount();
    List<UserInfos> findMyAreaUserList(UserInfos user);

    long userMyAreaCount(UserInfos user);
    
    long countUserList(UserInfos user);
    
    /**
	 * 根据手机号查询整个用户信息
	 * @param phone
	 * @return
	 */
	User selectByPhone(@Param(value = "phone") String phone);
	
}